package org.ithang.application.notice.service;

import java.util.List;
import java.util.Map;
import org.ithang.application.notice.mapper.NoticeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.apache.log4j.Logger;
import org.ithang.tools.model.Pager;
import org.ithang.tools.database.ModelDao;
import org.ithang.application.notice.bean.Notice;

/**
 * 系统公告 服务
 * @author zyt
 *
 */
@Service
public class NoticeService extends ModelDao<Notice>{

    @Autowired
    private NoticeMapper noticeMapper;

    private Logger logger = Logger.getLogger(NoticeService.class);
    
    public void add(Notice notice){
        noticeMapper.add(notice);
    }
    
    public Notice get(Integer id){
        return noticeMapper.get(id);
    }
    
    public int delete(Integer id){
        return noticeMapper.delete(id);
    }
    
    public int batchDelete(String[] ids){
    	return noticeMapper.batchDelete(ids);
    }
    
    public List<Notice> list(Integer... ids){
    	return noticeMapper.list(ids);
    }
    
    public List<Notice> page(Pager<Notice> page){
    	return noticeMapper.page(page);
    }
    
    public List<Notice> query(Map<String,Object> conditions){
    	return noticeMapper.query(conditions);
    }
    
    public int update(Notice notice){
    	return noticeMapper.update(notice);
    }
    
    
}